package com.project.service;

import com.project.dao.IUserDao;
import com.project.dao.impl.UserDaoImpl;
import com.project.server.Request;
import com.project.server.Response;
import com.project.server.Servlet;

/**
 * 修改业务组件
 */
public class UpdateService implements Servlet {

    private IUserDao userDao = new UserDaoImpl();

    public void service(Request request, Response response) {

        String phone = request.getParameter("phone");

        int id = Integer.parseInt(request.getParameter("id"));
        userDao.updatePhoneById(id, phone);

        FindAllService findAll = new FindAllService();
        findAll.service(request, response);

    }
}